import React, { Component } from 'react';
import ReactDom from 'react-dom';
import {connect} from 'react-redux';
import {Carousel,Item} from 'element-react';
import './index.less';
import {authLogin} from '../../actions/auth';
import Jellyfish from './images/Jellyfish.jpg';
import Koala from './images/Koala.jpg';
import Tulips from './images/Tulips.jpg';
import Penguins from './images/Penguins.jpg';
import qrcode from './images/qrcode.png';

console.log('>>>>>>>>>>>>>>',Jellyfish);

class Login extends Component {
  constructor(props) {
    super(props);
    this.state = {
      data:[]
    }

  }
  login() {
     // this.props.dispatch(authLogin(JSON.stringify(this.state.form)));
    // this.props.dispatch(authLogin('token'));
  }
  render() {
    return (
      <div className="Login_C">
        <h1>兴业管家 管钱 管事</h1>
        <div className="demo-3 medium">
          <Carousel interval="5000" arrow="always">
            {
                //this.props.data.map()
                [Jellyfish,Koala,Penguins,Tulips].map((item, index) => {
                return (
                    <Carousel.Item key={index}>
                      {/*<img src={item}  className="banner_images"/>*/}
                    </Carousel.Item>
                )
              })
            }
          </Carousel>

        <img className="Qrcode" src={qrcode} onClick={() => this.login()}/>
        <span>{this.state.mesage}</span>
        </div>
          <ul className="footer">
            <li>一流的服务，全新的体验，不一样的感觉</li>
            <li>一流的服务，全新的体验</li>
            <li>一流的服务</li>
          </ul>
      </div>
    );
  }

}

export default connect()(Login);
